# from appium import webdriver
# import time
# import logging
#
# class Driver:
#     __app__driver = None
#
#     @classmethod
#     def get_app_driver(cls):
#         if cls.__app__driver == None:
#             cls.desired_caps = {
#                 "platformName": "Android",
#                 "platformVersion": "",
#                 "deviceName": "aa",
#                 "appPackage": "com.android.settings",
#                 "appActivity": ".Settings"
#             }
#
#             cls.driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", cls.desired_caps)
#             cls.__app__driver = cls.driver
#         return cls.__app__driver
#
#     @classmethod
#     def quit_app_driver(cls):
#         if cls.__app__driver is not None:
#             cls.__app__driver.quit()
#             # print(cls.__app__driver)
#             cls.__app__driver = None
#
#
# if __name__ == '__main__':
#     Driver.get_app_driver()
#
#     time.sleep(3)
#     Driver.get_app_driver()
#     time.sleep(2)
#     Driver.quit_app_driver()
#
